Skip to content

Conversation

@rawahars
Copy link
Contributor

This pull request introduces a new guest-side management layer for virtual machines (VMs), clearly separating guest operations from host-side management and configuration. It does so by defining new interfaces and concrete implementations for interacting with the guest via the Guest Compute Service (GCS).

Note This PR is dependent upon #2597


The most important changes are:

Guest Manager Interface and Implementation:

  • Introduced the GuestOps interface in internal/vm/guest.go, which defines APIs for establishing a GCS connection and performing guest-side operations (network, storage, device, security policy, etc.). This interface is the contract for guest management.
  • Added a new guestManager implementation of GuestOps in internal/vm/guestmanager/hcs.go, which manages the GCS connection lifecycle, applies configuration options, and exposes guest-side management interfaces.

Guest Resource Management Implementations:

  • Implemented concrete guest-side managers for:
    • Network operations (GuestNetworkManager) in internal/vm/guestmanager/network.go
    • Directory mapping (DirectoryManager) in internal/vm/guestmanager/mapped_directory.go
    • Combined layers management (LayersManager) in internal/vm/guestmanager/combinedlayers.go
    • Device management (GuestDeviceManager) in internal/vm/guestmanager/device.go
    • Block CIMs management (BlockCIMsManager) in internal/vm/guestmanager/block_cims.go

This refactor lays a foundation for clean separation between host and guest responsibilities.

@rawahars rawahars requested a review from a team as a code owner February 11, 2026 06:13
Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
@rawahars rawahars force-pushed the feat/vm-package-guestmanager branch from 76df85b to 3807b37 Compare February 11, 2026 11:14

// LayersManager exposes combined layer operations in the guest.
type LayersManager interface {
AddCombinedLayers(ctx context.Context, settings interface{}) error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need combine and combine wcow? What is different?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh its C WCOW. I get it. This isn't lcow/wcow difference its confidential vs not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have to be C 'W' COW? Or can it just be CombineConfidentialLayers() ? Is there something special here from the guest request perspective?

)

// BlockCIMsManager returns the guest block CIMs manager.
func (gm *guestManager) BlockCIMsManager() vm.BlockCIMsManager {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have managers why dont they have the fn's that relate to what they do?

vm.BlockCIMManager().AddBlockCIM(settings) ?

vm.AddBlockCIM(settings) is what we have today. What is the point of the manager then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants